<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>

    <script type="text/javascript" src="static/js/jquery.min.js"></script>
    <script type="text/javascript"
            src="static/js/bootstrap/js/bootstrap.min.js"></script>
    <link rel="stylesheet"
          href="static/js/bootstrap/css/bootstrap.min.css" />
    <link rel="stylesheet"
          href="static/js/bootstrap/css/bootstrap-treeview.min.css"
          th:href="@{static/js/bootstrap/css/bootstrap-treeview.min.css}"
    >
    <script src="static/js/bootstrap/js/bootstrap-treeview.min.js"></script>
    <link rel="stylesheet"
          href="static/js/bootstrap/css/bootstrap.addtabs.css">
    <script src="static/js/bootstrap/js/bootstrap.addtabs.min.js"></script>
    <link rel="stylesheet" href="static//js/bootstrap/css/bootstrap-table.min.css">
    <script src="static/js/bootstrap/js/bootstrap-table.min.js"></script>
    <script src="static/js/bootstrap/js/bootstrap-table-zh-CN.min.js"></script>
    <script src="static/js/bootstrap/js/bootbox.js"></script>
    <link rel="stylesheet"
          href="static/js/bootstrap/css/bootstrap-datetimepicker.min.css" />
    <script type="text/javascript"
            src="static/js/bootstrap/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript"
            src="static/js/bootstrap/js/bootstrap-datetimepicker.zh-CN.js"></script>
    <script src="static/js/bootstrap-fileinput/js/fileinput.js"></script>
    <script src="static/js/bootstrap-fileinput/js/locales/zh.js"></script>
    <link rel="stylesheet" href="static/js/bootstrap-fileinput/css/fileinput.css">
</head>
<body onload="wzyforgetparticulars()">
<button class="btn btn-primary btn-lg" data-toggle="modal" onclick="offer()">我要报价</button>
<div class="container"  style="width: 100%;">
    <div style="height: 50px;"><span id="productName"></span>

    </div>
    <b>定制产品</b>
    <hr>
    产品类别：<span id="productCategory"></span>
    <br>
    采购数量：<span id="productCount"></span>个
    <br><br>
    <b>详细定制要求</b>
    <hr>
    <table cellspacing="1px" border="1px" style="width: 80%">
        <tr>
            <td>
                <p style="background-color: #a6e1ec ;font-size: 20px"><b style="color: red">*</b>商品交易信息</p>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                预期总价（含税）:<span id="expectTotal"></span>元
            </td>
        </tr>
        <tr>
            <td>
                <table align="center" style="width: 100%;font-size: 20px" >
                    <tr style="background-color: #a6e1ec ;width: 60%">
                        <td>付款节点</td>
                        <td>付款比例</td>
                        <td>账期(天)</td>
                    </tr>

                    <tr>
                        <td>预付款</td>
                        <td>100%</td>
                        <td>3</td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table align="center" style="width: 80%;" >
                    <tr style="width: 60%">
                        <td>发票类型：</td>
                        <td>增值税普通发票</td>
                        <td>税率：平衡科目税</td>
                    </tr>
                    <tr>
                        <td>开票方式：</td>
                        <td>按订单金额开票</td>
                        <td>
                            <input type="hidden" id="priceId">
                            <input type="hidden" id="productId">
                        </td>
                    </tr>
                    <tr>
                        <td>结算商：</td>
                        <td>新奥投资有限公司</td>
                        <td></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <table align="center" style="width: 80%;" >
                    <tr style="width: 60%">
                        <td> 配送方式：</td>
                        <td>线上发货</td>
                        <td></td>
                        <td></td>
                    </tr>
                    <tr>
                        <td>收货地址：</td>
                        <td><span id="userRealName"></span></td>
                        <td><span id="address"></span></td>
                        <td><span id="userPhone"></span></td>
                    </tr>
                    <tr>
                        <td>采购部门：</td>
                        <td><span id="purchasingDepartmentId"></span></td>
                        <td><span id="departmentOrganizationId"></span></td>
                        <td><span></span></td>
                    </tr>
                    <tr>
                        <td>默认工厂：</td>
                        <td><span>廊坊燃气销售服务</span></td>
                        <td><span id="defaultPlant"></span></td>
                        <td><span id="aa"></span></td>
                    </tr>
                </table>
            </td>
        </tr>
        <tr>
            <td>
                <p style="background-color: #aae4ef ;font-size: 20px"><b style="color: #e51919">*</b>备注信息</p>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <span id="queryPriceRemark"></span>
            </td>
        </tr>
        <tr>
            <td>
                <p style="background-color: #a6e1ec ;font-size: 20px"><b style="color: red">*</b>附件</p>
                &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                <span id="queryPriceAccessory"></span>
            </td>
        </tr>
    </table>
    <br>
    <h4>报价规则:
        <br>
        1.报价时如采购商未填写材料单，则供应商需要填写材料单上传设计图纸并报价，同时需要设置该报价的有效期；
        <br>
        2.在报价截止日期之前供应商可以随时修改报价及放弃报价，如放弃报价则本次不能再对该项目进行报价；
        <br>
        3.如因采购商原因关闭了该项目的采购需求，则供应商的报价将失效，如该采购商又重新发起该项目，供应商可延用并修改上次的报价，也可重新报价。
        <br>
        4.如采购商在供应商报价后修改了采购需求，则之前的报价失效，供应商可延用报价或者重新报价；
        <br>
        5.供应商在被选为中标企业后需按照承诺给采购商供货。
    </h4>
</div>

</body>
<script>

    function wzyforgetparticulars(){
        $.ajax({
            "url":"wzyforgetparticulars",
            "dataType" : "json",
            "success" : function(data){
                console.log(data.user.userRealName);
                var productName = document.getElementById("productName")
                var productCategory = document.getElementById("productCategory");
                var productCount = document.getElementById("productCount");
                var expectTotal = document.getElementById("expectTotal");
                var userRealName = document.getElementById("userRealName");
                var address = document.getElementById("address");
                var userPhone = document.getElementById("userPhone");


                var purchasingDepartmentId = document.getElementById("purchasingDepartmentId");
                var departmentOrganizationId = document.getElementById("departmentOrganizationId");
                var defaultPlant = document.getElementById("defaultPlant");
                var defaultInventory = document.getElementById("aa");



                var queryPriceRemark = document.getElementById("queryPriceRemark");
                var queryPriceAccessory = document.getElementById("queryPriceAccessory");
                var priceId = document.getElementById("priceId");
                var productId = document.getElementById("productId");

                productName.innerHTML+="<h2>"+data.product.productName+"</h2>";
                productCategory.innerHTML+=data.product.productCategory;
                productCount.innerHTML+=data.product.productCount;
                expectTotal.innerHTML+=data.product.expectTotal;
                userRealName.innerHTML+=data.user.userRealName;
                address.innerHTML+=data.product.address;
                userPhone.innerHTML+=data.user.userPhone;


                purchasingDepartmentId.innerHTML+=data.product.departmentName;
                departmentOrganizationId.innerHTML+=data.product.organizationName;
                defaultPlant.innerHTML+=data.product.plantName;
                defaultInventory.innerHTML+=data.product.inventoryName;



                queryPriceRemark.innerHTML+=data.product.queryPriceRemark;
                queryPriceAccessory.innerHTML+=data.product.queryPriceAccessory;
                priceId.value=data.product.queryPriceId;
                productId.value=data.product.productId;
            }
        })
    }

    /**
     * 我要报价
     */
    function offer(){
        var showPriceId = document.getElementById("priceId").value;
        var productId = document.getElementById("productId").value;
        location.href="gotoOffer?showPriceId="+showPriceId+"&productId="+productId;
    }



</script>
</html>